A Decomposition Rule for the Hoare Logic

نویسنده

  • Tadao Takaoka
چکیده

The Hoare logic introduced by Hoare [3] in 1969 is a good logical system to formalize the meaning of programs and programmin, ?mguages. It can also be used for program verification by band [l] and by computer [4]. There are two types of mechanical program verification. In [4], loop-invariants are given by hand and the consistencies between assertions are proved as theorems by computer. In [2,5,6], attempts have been made to generate loop-invarian t;; automatically, resulting in successful verification of a number of programs being correct and runtime error-free. Mechanical program verification by the Hoare logic has not, however, been very successful since it involves theorem proving, the complexity of which grows rapidly as the length of the program to be proved increases. This article presents a mechanism, called a decomposition rule, which reduces the complexity of theorem proving involved in program verification by the Hoare logic, and also works as a good heuristic for generating a correct postcondition for a program segment. The rule is simple and more specific than those in the references mentioned above, and is easy to use when the precondition for a program segment can be decomposed into several conditions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Hoare logic and VDM : machine-checked soundness and completeness proofs

Investigating soundness and completeness of verification calculi for imperative programming languages is a challenging task. Many incorrect results have been published in the past. We take advantage of the computer-aided proof tool LEGO to interactively establish soundness and completeness of both Hoare Logic and the operation decomposition rules of the Vienna Development Method (VDM) with resp...

متن کامل

Scope Logic: Extending Hoare Logic for Pointer Program Verification

This paper presents an extension to Hoare logic for pointer program verification. First, the Logic for Partial Function (LPF) used by VDM is extended to specify memory access using pointers and memory layout of composite types. Then, the concepts of data-retrieve functions (DRF) and memory-scope functions (MSF) are introduced in this paper. People can define DRFs to retrieve abstract values fro...

متن کامل

A rule-based evaluation of ladder logic diagram and timed petri nets for programmable logic controllers

This paper describes an evaluation through a case study by measuring a rule-based approach, which proposed for ladder logic diagrams and Petri nets. In the beginning, programmable logic controllers were widely designed by ladder logic diagrams. When complexity and functionality of manufacturing systems increases, developing their software is becoming more difficult. Thus, Petri nets as a high l...

متن کامل

Relational Decomposition

We introduce relational decomposition, a technique for formally reducing termination-insensitive relational program logics to unary logics, that is program logics for one-execution properties. Generalizing the approach of selfcomposition, we develop a notion of interpolants that decompose along the phrase structure, and relate these interpolants to unary and relational predicate transformers. I...

متن کامل

Hoare Logic with Updates A Hoare-Style Calculus with Explicit State Updates

We present a verification system for a variant of Hoare-logic that supports proving program correctness by forward symbolic execution. No explicit weakening rules are needed and first-order reasoning is automated. The system is suitable for teaching program verification, because the student can concentrate on reasoning about programs following their natural control flow and proofs are machine-c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 26  شماره 

صفحات  -

تاریخ انتشار 1987